<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
                >

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet name="default.css" library="css"/>
        <h:outputStylesheet name="tableLayout.css" library="css"/>
        <title>Formathlon</title>
    </h:head>

    <h:body>
        <table cellspacing="10px" style="width:100%">
            <tr>
                <td id="baniere">
                    <h:graphicImage name="spacer.gif" library="images" width="50" height="1"/>  
                    <h:graphicImage name="formathlon_titre.png" library="images"/><br/>
                    
                </td>
            </tr>
            <tr>
                <td id="contentLogin">
                    <ui:insert name="content">
                        <h:panelGroup rendered="#{param.fail eq true}" style="color : red">        
                            Erreur de connexion
                        </h:panelGroup>
                        <table align="center">
                            <tr>
                                <td style="vertical-align: middle">
                                  <h:graphicImage name="cadena.jpg" library="images"/>
                                </td>
                                <td style="vertical-align: middle">
                                  <!-- 
                                  -->
                                  <h:form id="contentForm" prependId="false">
                                    <p:panel id="panel" header="Authentification" style="margin-bottom:10px;">  
                                        <h:panelGrid columns="3">  
                                            <h:outputLabel for="j_username" value="Login : *" />  
                                            <p:inputText id="j_username"  required="true" label="login">  
                                                <f:validateLength minimum="2" />  
                                            </p:inputText>  
                                            <p:message for="j_username" />  

                                            <h:outputLabel for="j_password" value="Mot de passe : *" />  
                                            <p:inputText id="j_password"  label="pass" type="password"/>  
                                            <p:message for="j_password" /> 
                                            
                                            
                                        </h:panelGrid>  
                                     </p:panel>   

                                      <p:commandButton value="Connexion" action="#{loginControler.doLogin()}" ajax="false"  />
                                      <p:commandButton action="/faces/index?faces-redirect=true" value="Annuler"   ajax="false"/>
                                            
                                    
                                    </h:form>
                                    
                                  <!-- -->  
                                </td>
                            </tr>
                            
                        </table>
                    </ui:insert>
                </td>
            </tr>
            <tr>
                <td id="bottom" align="center">
                    <h1 class="title ui-widget-header ui-corner-all"> ©2012 All Rights Reserved • Design by OPIF </h1>
                </td>
            </tr>
        </table>
    </h:body>

</html>
